/**
 * 
 */
package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 环信账户
 * @author guoyongxiang
 * @since 1.0.0
 */
@Entity
@Table(name = "dr_easemob_account")
public class DrEasemobAccount {

    public static final int RESET_PASS_NO = 0;
    public static final int RESET_PASS_YES = 1;

    /** 主键 */
    private Long id;
    /** 医生ID */
    private Long doctorId;
    /** 环信应用名 */
    private String appName;
    /** 环信UUID */
    private String uuid;
    /** 环信用户名 */
    private String username;
    /** 环信密码 */
    private String encryptPassword;
    /** 重置密码标识: 次获取账户信息时重置密码0:不重置,1:重置 */
    private Integer resetPass;
    /** 创建时间 */
    private Date createdAt;
    /** 修改时间 */
    private Date changedAt;

    public DrEasemobAccount() {
        super();
    }

    public DrEasemobAccount(String appName, Long doctorId, String username) {
        super();
        this.appName = appName;
        this.doctorId = doctorId;
        this.username = username;
        // 默认修改密码
        this.resetPass = RESET_PASS_YES;
        Date date = new Date();
        this.createdAt = date;
        this.changedAt = date;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "doctor_id")
    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    @Column(name = "app_name")
    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Column(name = "username")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Column(name = "encrypt_password")
    public String getEncryptPassword() {
        return encryptPassword;
    }

    public void setEncryptPassword(String encryptPassword) {
        this.encryptPassword = encryptPassword;
    }

    @Column(name = "reset_pass")
    public Integer getResetPass() {
        return resetPass;
    }

    public void setResetPass(Integer resetPass) {
        this.resetPass = resetPass;
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

}
